package com.ls.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

public class Test {
    public static void main(String[] args) {

    }


    public  static Object getBean(){
        Object proxyInstance = Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class<?>[]{Book.class}, new InvocationHandler() {
            @Override
            public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {


                return null;
            }
        });
        return proxyInstance;
    }

    class Book{

        public void read(){
            System.out.println("读");
        }
    }

}
